<?php
namespace Home\Widget;
use Think\Controller;

class CateWidget extends Controller {
  public function menu(){
      $this->cates=M('category')->order('lv')->select();
      $this->display('Cate:menu');
  }

  public function newest(){
    $this->articles=M('article')->field('id,title,addtime')->order('id desc')->limit(0,5)->select();
    $this->display('Cate:newest');
  }
}
